'''
 接口：https://liuyan.people.com.cn/v1/threads/list/bw
 第一次入参
 {
  "appCode": "PC42ce3bfa4980a9",
  "token": "",
  "signature": "122f6d48d8c3def685c939cbba1adc7f",
  "param": "{\"fid\":\"5050\",\"showUnAnswer\":1,\"typeId\":5,\"lastItem\":\"\",\"position\":\"1\",\"rows\":10,\"orderType\":2}"
}

第二次
{
  "appCode": "PC42ce3bfa4980a9",
  "token": "",
  "signature": "122f6d48d8c3def685c939cbba1adc7f",
  "param": "{\"fid\":\"5050\",\"showUnAnswer\":1,\"typeId\":5,\"lastItem\":\"\",\"position\":\"1\",\"rows\":10,\"orderType\":2}"
}
'''
import hashlib

m5 = hashlib.md5()
m5.update('PC42ce3bfa4980a9'.encode('utf-8'))
print(m5.hexdigest()[0:16])
e = '''/v1/threads/list/bw'''
t2jsonstr = '''{\"fid\":\"5055\",\"showUnAnswer\":1,\"typeId\":5,\"lastItem\":\"\",\"position\":\"1\",\"rows\":10,\"orderType\":2}'''
c = m5.hexdigest()[0:16]


signature = e + t2jsonstr + c

m5 = hashlib.md5()
signature = m5.update(signature.encode('utf-8'))
print(m5.hexdigest())






